import React, {useEffect, useState} from 'react';
import IndexMainHeader from "../../components/indexMain/indexMainHeader/indexMainHeader";
import TweetsList from './tweetsList';
import {post} from "../../utils/post";
function IndexMain(props) {
    const[data,changeData]=useState([])
    useEffect(()=>{
        post('/api/getmessages',{ data:null }).then(
            res=>{
                changeData(res.data.data.userMessages)
            })
    },[])
   

    return (
      <>
          <IndexMainHeader ></IndexMainHeader>
          <TweetsList isPerson={false} showImg={true} data={data}></TweetsList>
      </>
    );
}

export default IndexMain;